package com.tt.vtg.service;

import java.util.List;
import java.util.Optional;
import java.util.Set;

import com.tt.vtg.dao.entity.User;
import com.tt.vtg.plain.info.UserInfo;

public interface UserService {
	UserInfo get(Long id);
	void save(User user);
	void update(User user);
	UserInfo getById(String id);
	Optional<User> getUserEntityById(String userId);
	void delete(long id);
	List<UserInfo> getAll();
	
	/**
	 * 通过UserName获取User
	 */
	User findByUserName(String userName);
	
	/**
	 * 通过UserName获取Roles
	 */
	Set<String> findRolesByUserName(String userName);
	
	/**
	 * 通过UserName获取Permissions
	 */
	Set<String> findPermissionsByUserName(String userName);
	
	User findOne(Long id);
}
